<?php get_instance()->view('common/header');?>
<style type="text/css">
    .blue-stripe{margin-right: 10px;}
</style>
<div class="page-container home">
  <?php get_instance()->view('common/sidebar');?>
  <div class="page-content-wrapper">
	  <div class="page-content">
	    <div class="row">
	      <div class="col-md-12">
	        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
	        <h3 class="page-title"><?php echo $title ?></h3>
	        <ul class="page-breadcrumb breadcrumb">
	          <li><i class="fa fa-home"></i><a href="javascript:void(0);"><?php echo $title ?></a></li>
	        </ul>
	        <!-- END PAGE TITLE & BREADCRUMB-->
	      </div>
	    </div>
	    <div class="row">
	      <div class="col-md-12">
	      		<div class="portlet">
	            <div class="portlet-body">
	              <div class="table-container">
	                <div class="table-actions-wrapper"> <span> </span></div>
	                <table class="table table-bordered table-hover scoll-title" id="datatable">
	                  <thead>
					  <tr role="row" class="heading">
                          <th></th>
						  <th width="120px" sort="false">反馈时间</th>
						  <th width="120px">消费者</th>
						  <th width="120px">商家</th>
						  <th desc="true" >反馈内容</th>
						  <th desc="true" width="300px">回复内容</th>
						  <th width="100px">是否已处理</th>
						  <th width="150px">操作</th>
					  </tr>
					  <tr>
                          <th></th>
						  <th>
                              <div class="margin-bottom-5">
                                  <input class="form-control form-filter input-sm" name="send_date_from" dp placeholder="从" type="text">
                              </div>
                              <input class="form-control form-filter input-sm" name="send_date_to" dp placeholder="到" type="text">
                          </th>
						  <th></th>
						  <th></th>
						  <th><input class="form-control form-filter input-sm" name="content" type="text" placeholder="搜索内容"></th>
						  <th></th>
						  <th>
							  <select name="status" class="form-control form-filter input-sm">
								  <option value="" selected="selected">所有</option>
								  <?php foreach ($status as $k => $v):?>
									  <option value="<?php echo $k;?>"><?php echo $v;?></option>
								  <?php endforeach;?>
							  </select>
						  </th>
						  <th>
                              <div class="btn-group">
								  <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
								  <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
								  <ul role="menu" class="dropdown-menu pull-right">
									  <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
								  </ul>
							  </div>
                          </th>
					  </tr>
	                  </thead>
	                  <tbody></tbody>
	                </table>
	              </div>
	            </div>
	          </div>
	      </div>
	    </div>
	  </div>
  </div>
</div>
<div id="model-modal" style="top: 20%;" class="modal fade modal_small" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
				<h4 class="modal-title"></h4>
			</div>
			<form action="<?php echo getUrl('feedback/reply');?>" class="form-horizontal" id="model-form" method="post">
				<div class="modal-body">
					<div class="form-group">
						<label class="control-label col-md-3">回复内容 <span class="required">*</span></label>
						<div class="col-md-9">
							<textarea class="form-control required" name="reply" style="height: 100px" placeholder="请输入回复内容"></textarea>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<input type="hidden" name="id" value="">
					<button class="btn green field-submit-btn"><i class="fa fa-save"></i> 保存</button>
					<script type="text/javascript">
						$(function(){
							var model = $('#model-modal');

							/**
							 * 回复
							 */
							$('.edit-btn').live('click', function(){
								var p = $(this);
                                var id = p.attr('data-id');
                                model.find('.modal-title').html('回复反馈');
                                $("#model-form").attr('action',"<?php echo getUrl('feedback/reply');?>");
                                model.find('[name="id"]').val(id);
                                model.find('[name="reply"]').val('');
                                model.find('.has-error').removeClass('has-error').find('.validate_message').remove();
                                model.find('.show_message_error').remove();
                                model.modal();
							});

							$.e_validate.init('#model-form',{modal:model,ignore:'',successCallback:function(data){
							}});

						});
					</script>
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		datatable_init({
			src: $("#datatable"),
			sAjaxSource: "<?php echo getUrl('feedback/getList');?>",
            aoColumnDefs : [
                {
                    'bSortable' : false,
                    'aTargets' : [0,2,3,4,5,6]
                },
                { "bVisible": false, "aTargets":[0]}
            ]
		});

        $('[dp]').not("[noinit]").datepicker({
            changeMonth: true,
            autoclose: true,
            format: "yyyy-mm-dd",
            language: 'zh-CN'
        });

		$('.sss').live('mouseover',function(){
			$(this).height('75px');
		});

		$('.sss').live('mouseout',function(){
			$(this).height('28px');
		})
	});
</script>
</body>
</html>